﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CallContacts.aspx.cs" Inherits="Business_Cisoft3G_ContactsManage_CallContacts" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>呼叫通讯录</title>
    <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/font.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div>
                <table>
                    <tr>
                        <td rowspan="2">
                            <table style="background-color: #ffffff">
                                <tr>
                                    <td valign="top">
                                        <asp:TreeView ID="tvContactsGroup" runat="server" ImageSet="Arrows" ShowLines="True"
                                            OnSelectedNodeChanged="tvContactsGroup_SelectedNodeChanged">
                                            <ParentNodeStyle Font-Bold="False" />
                                            <HoverNodeStyle Font-Underline="False" ForeColor="#5555DD" />
                                            <SelectedNodeStyle Font-Underline="False" HorizontalPadding="0px" VerticalPadding="0px"
                                                ForeColor="#5555DD" Font-Bold="true" />
                                            <RootNodeStyle ForeColor="Blue" />
                                            <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="5px"
                                                NodeSpacing="0px" VerticalPadding="0px" />
                                        </asp:TreeView>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td valign="top">
                            <!--查询框-->
                            <table>
                                <tr>
                                    <td>
                                        <span style="color:White;">姓名：</span>
                                        <asp:TextBox ID="txtName" runat="server" style="border:1px solid #ffffff; width:70px" MaxLength="4"></asp:TextBox>
                                        <span style="color:White;">手机号码：</span>
                                        <asp:TextBox ID="txtMobile" runat="server" style="border:1px solid #ffffff; width:90px" MaxLength="11"></asp:TextBox>
                                        <asp:Button ID="btnSearch" runat="server" Text="" ToolTip="查询" 
                                            onclick="btnSearch_Click" />
                                        <asp:RegularExpressionValidator ID="rev1" runat="server" ControlToValidate="txtMobile" Display="Dynamic" ValidationExpression="^\d{1,11}$"
                                            ErrorMessage="请输入数字！"></asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                            </table>    
                            <!--数据列表头和数据列表-->
                            <table width="500px" border="0" cellspacing="1" cellpadding="0" bgcolor="73798f"
                                id="table1">
                                <tr class="cyan12" bgcolor="#1E3541">
                                    <td width="25" height="20" valign="middle" style="text-align: center">
                                        <asp:CheckBox ID="chcAll" runat="server" AutoPostBack="true"
                                            oncheckedchanged="chcAll_CheckedChanged" />
                                    </td>
                                    <td width="50" align="center" valign="middle">
                                        姓名
                                    </td>
                                    <td align="center" valign="middle" width="70">
                                        电话号码
                                    </td>
                                    <td width="70" align="center" valign="middle">
                                        手机号码
                                    </td>
                                    <td align="center" valign="middle">
                                        单位
                                    </td>
                                    <td width="55" align="center" valign="middle">
                                        部门
                                    </td>
                                    <td width="55" align="center" valign="middle">
                                        职务
                                    </td>
                                </tr>
                                <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
                                    <ItemTemplate>
                                        <tr bgcolor="#1E3541" onmousemove="this.className='li_td_mouseover'" onmouseout="this.className='li_td_mouseout'">
                                            <td height="20" align="center" valign="middle">
                                                <asp:CheckBox ID="cbk_single" runat="server" name="cb1" AutoPostBack="true" OnCheckedChanged="Check_Click" />
                                                <asp:Label ID="lblContactID" runat="server" Visible="false" Text='<%#DataBinder.Eval(Container.DataItem, "CT_ContactID")%>'></asp:Label>
                                            </td>
                                            <td align="center" valign="middle" style="color: White">
                                                <%#DataBinder.Eval(Container.DataItem, "CT_Name")%>
                                            </td>
                                            <td align="center" valign="middle" style="color: White">
                                                <%#DataBinder.Eval(Container.DataItem, "CT_Phone")%>
                                            </td>
                                            <td align="left" valign="middle" style="color: White">
                                                <%#DataBinder.Eval(Container.DataItem, "CT_Mobile")%>
                                            </td>
                                            <td align="center" valign="middle" style="color: White">
                                                <asp:Label ID="lblCompany" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CT_Company").ToString().Length > 10 ?  DataBinder.Eval(Container.DataItem, "CT_Company").ToString().Substring(0, 17) + "...": DataBinder.Eval(Container.DataItem, "CT_Company").ToString()%>'
                                                    ToolTip='<%#DataBinder.Eval(Container.DataItem, "CT_Company")%>'></asp:Label>
                                            </td>
                                            <td align="center" valign="middle" style="color: White">
                                                <%#DataBinder.Eval(Container.DataItem, "CT_Department")%>
                                            </td>
                                            <td align="center" valign="middle" style="color: White">
                                                <%#DataBinder.Eval(Container.DataItem, "CT_Duty")%>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                            <!--数据分页-->
                            <table width="500px" border="0" cellspacing="1" cellpadding="0" bgcolor="73798f">
                                <tr>
                                    <td>
                                        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" UrlPaging="false" AlwaysShow="true"
                                            CustomInfoHTML="<span style='color:white'>共%PageCount%页 %RecordCount%条记录</span>"
                                            ShowCustomInfoSection="Left" FirstPageText="首页" PrevPageText="前一页" NextPageText="下一页"
                                            LastPageText="末页" HorizontalAlign="right" PageSize="10" OnPageChanged="AspNetPager1_PageChanged"
                                            EnableTheming="true">
                                        </webdiyer:AspNetPager>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td valign="bottom">
                            <span style="color: White">已选择联系人：</span>
                            <br />
                            <asp:TextBox ID="txtContactsSelected" runat="server" Width="496px" Style="border: 1px solid #ffffff;
                                height: 80px;" TextMode="MultiLine"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
